#include "precomp.h"

#pragma once

#include "GameObject.h"

class Character;

#define BULLET_IMAGE_PATH "./images/bullet.png"

class Bullet : GameObject{
public:
	Bullet(){}

	Bullet(CL_GraphicContext *gc, CL_Angle angle, CL_Pointf origi, int damage, float range, Map* map, list<Character*> *collide_characters = NULL, float speed = 0.5, float collide_radius = 14.0, const char* image_path = BULLET_IMAGE_PATH);

	void tick(float delta_time);

	bool collide_character(Character *object);

	bool is_dead();

	void draw(float ch_x, float ch_y);

	float range_count();

	int get_damage();

private:
	list<Character*> *_collide_characters;
	
	CL_Angle _angle;

	CL_Pointf _origi;

	int _damage;

	float _speed, _range;

	bool _die;
};